

<!--    <title>京东评论终端类型</title>-->

<div th:include="amd.html::head-title"></div>
<script>
    var myChart = echarts.init(document.getElementById('main'));
    var option = {
        title: {
            text: '终端统计情况',
            subtext: '终端信息',
            x: 'center'
        },
        tooltip: {
            trigger: 'item',
            formatter: "{a} <br/>{b} : {c} ({d}%)"
        },
        legend: {
            orient: 'vertical',
            left: 'left'
        },
        series: [
            {
                name: '访问终端类型',
                type: 'pie',
                radius: '55%',
                center: ['50%', '60%'],
                data: (function () {
                    var datas = [];
                    $.ajax({
                        type: "GET",
                        url: "/ismobile/list",
                        dataType: "json",
                        async: false,
                        success: function (data) {
                            for (var i = 0; i < data.length; i++) {
                                datas.push({
                                    "value": data[i].num, "name": data[i].ismobile
                                })
                            }
                        }
                    });
                    return datas;
                })(),
                itemStyle: {
                    emphasis: {
                        shadowBlur: 10,
                        shadowOffsetX: 0,
                        shadowColor: 'rgba(0, 0, 0, 0.5)'
                    }
                }
            }
        ]
    };
    myChart.setOption(option);
</script>


</body>
</html>